<!DOCTYPE html>

<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
	<meta charset="utf-8" />
	<title>{$webtitle}－管理后台</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1.0" name="viewport" />
	<meta content="" name="description" />
	<meta content="" name="author" />
	   <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
 
	<!-- BEGIN GLOBAL MANDATORY STYLES -->          
	
	<link href="__ROOT__/Public/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
	<link href="__ROOT__/Public/css/admin.css" rel="stylesheet" type="text/css"/>
	<link href="__ROOT__/Public/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<!-- END GLOBAL MANDATORY STYLES -->
	<!-- BEGIN THEME STYLES --> 
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="__ROOT__/Public/js/html5shiv.min.js"></script>
        <script src="__ROOT__/Public/js/respond.min.js"></script>
    <![endif]-->
	<!-- END THEME STYLES -->
	
</head>
<!-- BEGIN BODY -->
<body>

<!-- BEGIN nav -->
	 <include file="Public:header" />
<!-- end nav -->

<!-- begin container -->

<div class=" container " style="margin-top:60px;min-height:600px;">


	  <div class="col-lg-12 col-md-12 col-xs-12" style="background-color: #FFF;">
	  
        
		
		<!-- begin tab -->
	      <ul class="nav nav-tabs " >
             <li><a href="{:U('Foodcat/index/')}" ><b>商品分类</b></a></li>
			 <li><a href="{:U('Foodcat/add/')}" ><b>分类增加</b></a></li>
             <li class="active"><a href="{:U('Food/index/')}" ><b>商品维护</b></a></li>
			 <li><a href="{:U('Food/add/')}" ><b>商品增加</b></a></li>
          

          </ul>
		  <p></P>
		  
    
           <div class="row"> 
             <div class="col-lg-2 col-md-2 col-xs-2" ><a class="btn blue" href="{:U('Food/add/')}"> <i class="fa fa-plus"></i>增加商品</a></div>
			 <div class="col-lg-6 col-md-6 col-xs-6" ><span class="help-block"></span></div>
			 <div class="col-lg-4 col-md-4 col-xs-4" ></div>
		  
		  </div><!-- end 添加 -->
		  <p></P>




			  
			      <table class="table table-striped table-bordered table-hover">
									<thead>
										<tr>
										  
											<th>菜名</th>
											<th>价格</th>
											
											<th>分类</th>
											<th>排序</th>
											<th>状态</th>
											<th>操作</th>
											
										</tr>
									</thead>
									<tbody>
									<volist name="foodlist" id="vo">
										<tr>
	                                      
											<td>{$vo.fname}</td>
											<td>{$vo.fprice}</td>
											
											<td>{$vo.fcname}</td>
											<td>{$vo.fsort}</td>
											<td>
											<eq name="vo.status" value="0">上架<else/>下架</eq>

											</td>							
											
											<td>
											    
											    <a class="btn btn-default btn-xs" href="{:U('Food/edit/','id='.$vo['fid'])}"> 修改</a>　
													<eq name="vo.status" value="0">
													<a class="btn btn-default btn-xs" href="{:U('Food/down/','id='.$vo['fid'])}" onclick="down()">下架</a>
													<else/>
													<a class="btn btn-primary btn-xs" href="{:U('Food/up/','id='.$vo['fid'])}" onclick="up()"> 上架</a>
													</eq>
												   
												
　<a class="btn btn-default btn-xs" href="{:U('Food/del/','id='.$vo['fid'])}" onclick="delcfm()"><i class="fa fa-trash-o"></i> 删除</a>
											</td>
											
										</tr>
									</volist>
									</tbody>
								</table>
			  
			  
			  
			  
			  


    <ul class="pagination">
							    {$page}
                                
                             </ul>

			  
	

			  
			  
			
             
	
     

	  
	  
	  
	
	 </div><!-- col end -->

</div><!-- end row -->


  


    
</div><!-- end container -->


    
         
	


	
<!-- /.modal -->



				
				
			
	

	
	
	<br><br>

<include file="Public:foot" />	
	
	
	
	
	
	
	<!-- END FOOTER -->
	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
	<!-- BEGIN CORE PLUGINS -->   

	
	
	
    <script src="__ROOT__/Public/js/jquery.js"></script>
    <script src="__ROOT__/Public/js/bootstrap.min.js"></script> 
<script >
	
	$('#myModal').on('hidden.bs.modal', function (e) {
	location.reload()

})
$('#ajax').on('hidden.bs.modal', function (e) {
	location.reload()

})


function delcfm() {
if (!confirm("确认要删除？")) {
window.event.returnValue = false;
}
}

function down() {
if (!confirm("确认此商品上架？")) {
window.event.returnValue = false;
}
}
function up() {
if (!confirm("确认此商品下架？")) {
window.event.returnValue = false;
}
}

</script>	

	<!-- END CORE PLUGINS -->
	
	<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>